package com.lx.onbording.vshe.osgistarter.producer.impl;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

import com.lx.onbording.vshe.osgistarter.producer.api.RequestResponseService;

public class ProducerActivator implements BundleActivator {
	private ServiceRegistration registration = null;
	private RequestResponseService requestResponseService = new RequestResponseServiceImpl();

	@Override
	public void start(BundleContext context) throws Exception {
		registration = context.registerService(RequestResponseService.class.getName(),
				requestResponseService, null);

	}

	@Override
	public void stop(BundleContext context) throws Exception {
		registration.unregister();

	}

}
